package org.hnsd.train.pattern.decorator;

/**
 * @author youqd
 * @tag.date 2023-11-07 22:43
 **/
public class ConcreteDecorator1 extends Decorator{
    //定义被修饰者
    public ConcreteDecorator1(Component component){
        super(component);
    }
    //定义自己的修饰方法
    private void method1(){
        System.out.println("method1 修饰");
    }
    //重写父类的Operation方法
    @Override
    public void operation(){
        this.method1();
        super.operation();
    }
}
